<template>
    <div>
      <h1>用户列表</h1>
      <UserList :users="userStore.users" />
    </div>
  </template>
  
  <script setup lang="ts">
  import { onMounted } from 'vue'
  import { useUserStore } from '../stores/user'
  import UserList from '../components/UserList.vue'
  
  const userStore = useUserStore()
  
  onMounted(async () => {
    await userStore.loadUsers()
  })
  </script>